#:import levinCommon levin.levinCommon
#:import guiCommon levin.guiCommon

<ClearSelectorButton>:
    text: "clear"
    on_press: self.parent.clear()
    size_hint: (0.1,None)
    icon_src: levinCommon.iconPath("suppress.png")
    
<CreateSelector>:
    orientation: "horizontal"
    criteria: _criteria
    size_hint: (0.4 if root.selModifier is None else 1,1)
    on_criteria: _criteria.parent = self
    FilteredCriteriaCombo:
        id: _criteria
        size_hint: (0.3,None)


        
<FilteredCriteriaCombo>:
    editable: False
    on_choice_validated: self.parent.criteriaSelected(self.text)
    entryWidClass: guiCommon.LeVinCompactButton


<CustomSelectorWidget>:
    selectorWids: [_cs1, _cs2, _cs3, _cs4]
    fastSelector: [_fsColor, _fsNum, _fsText ]

    size_hint: (1.,1.)

    BoxLayout:
        orientation: "vertical"
        BoxLayout:
            ColorSelectorWid:            
                id: _fsColor
            NumSelectorWid:
                id: _fsNum
            TextSelectorWid:
                multiline: False
                id: _fsText
        CreateSelector:
            id: _cs1
        CreateSelector:
            id: _cs2
        CreateSelector:
            id: _cs3
        CreateSelector:
            id: _cs4
        # button bar
        LeVinButtonBar:            
            id: button_bar
            LeVinButton:
                id: _ok
                text: "Reset"
                on_press: root.reset()
            LeVinButton:
                id: _ok
                text: "Cancel"
                on_press: root.cancel()            
            LeVinButton:
                id: _ok
                text: "Ok"
                on_press: root.validate()
